-
Notifications
You must be signed in to change notification settings - Fork 14k
Add riscv64 uefi target #149036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add riscv64 uefi target #149036
Conversation
Added riscv64gc-unknown-uefi as a Tier 3 target.
|
Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb These commits modify compiler targets. |
|
r? @chenyukang rustbot has assigned @chenyukang. Use |
|
|
The job Click to see the possible cause of the failure (guessed by this bot) |
| // Return None to use the fallback mechanism in create_wrapper_file | ||
| // Use this fallback specifically for RISC-V 64 UEFI | ||
| return None; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thread 'rustc' panicked at compiler/rustc_codegen_ssa/src/back/metadata.rs:560:19:
called Result::unwrap() on an Err value: Error("unimplemented architecture Riscv64 with sub-architecture None")
stack backtrace:
0: 0x7fd4e3bee9cb - std::backtrace::Backtrace::create::h652c7106100133e9
1: 0x7fd4e3bee915 - std::backtrace::Backtrace::force_capture::hcbb8a9548a20f2ec
2: 0x7fd4db55d948 - std[e20d0b87aa1ec278]::panicking::update_hook::<alloc[d35db71d034d3387]::boxed::Box<rustc_driver_impl[709b8e3ce94d842e]::install_ice_hook::{closure#1}>>::{closure#0}
3: 0x7fd4e3bef91f - std::panicking::panic_with_hook::hd57cd463d793ed79
4: 0x7fd4e3bef6ca - std::panicking::panic_handler::{{closure}}::hddd6216c3fddee3b
5: 0x7fd4e3be6fe9 - std::sys::backtrace::__rust_end_short_backtrace::h5e7a56f283378525
6: 0x7fd4e3bc31ad - __rustc[256c90bb7e548b45]::rust_begin_unwind
7: 0x7fd4e3c60910 - core::panicking::panic_fmt::hf19c198748ef6a95
8: 0x7fd4e3c5f256 - core::result::unwrap_failed::he81173b5792ad6b0
9: 0x7fd4e2648404 - rustc_codegen_ssa[7f529d302ba2af36]::back::metadata::create_wrapper_file
10: 0x7fd4e25b485c - rustc_codegen_ssa[7f529d302ba2af36]::back::link::link_rlib
11: 0x7fd4e25a2008 - rustc_codegen_ssa[7f529d302ba2af36]::back::link::link_binary
12: 0x7fd4dba1f459 - <rustc_codegen_llvm[525d04dfcb951d0f]::LlvmCodegenBackend as rustc_codegen_ssa[7f529d302ba2af36]::traits::backend::CodegenBackend>::link
13: 0x7fd4db8eca19 - <rustc_interface[f3537463438a3ee8]::queries::Linker>::link
14: 0x7fd4db5b2b43 - rustc_span[eee2686a21fb97e]::create_session_globals_then::<(), rustc_interface[f3537463438a3ee8]::util::run_in_thread_with_globals<rustc_interface[f3537463438a3ee8]::util::run_in_thread_pool_with_globals<rustc_interface[f3537463438a3ee8]::interface::run_compiler<(), rustc_driver_impl[709b8e3ce94d842e]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
15: 0x7fd4db5aa5b9 - std[e20d0b87aa1ec278]::sys::backtrace::_rust_begin_short_backtrace::<rustc_interface[f3537463438a3ee8]::util::run_in_thread_with_globals<rustc_interface[f3537463438a3ee8]::util::run_in_thread_pool_with_globals<rustc_interface[f3537463438a3ee8]::interface::run_compiler<(), rustc_driver_impl[709b8e3ce94d842e]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
16: 0x7fd4db5ad49e - <<std[e20d0b87aa1ec278]::thread::Builder>::spawn_unchecked<rustc_interface[f3537463438a3ee8]::util::run_in_thread_with_globals<rustc_interface[f3537463438a3ee8]::util::run_in_thread_pool_with_globals<rustc_interface[f3537463438a3ee8]::interface::run_compiler<(), rustc_driver_impl[709b8e3ce94d842e]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[5b293a957d0a6e5f]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
17: 0x7fd4e3be180f - std::sys::thread::unix::Thread::new::thread_start::hbaf586a9e50a98cd
18: 0x7fd4d664b9cb -
19: 0x7fd4d66cfa0c -
20: 0x0 -
rustc version: 1.93.0-dev
platform: x86_64-unknown-linux-gnu
|
Is there a full coff specification for riscv nowadays or are relocations still not supported on riscv? If the latter then how would you even use this target in the first place? |
|
LLVM currently has a 'riscv64-unknown-windows |
Add
riscv64gc-unknown-uefitargetThis PR includes the bare minimum changes currently required to include a
riscv64gc-unknown-uefitarget into the Rust compiler source tree. A few minor changes totally a handful of lines were required outside of the target'starget.rsto get the build process to complete successfully, but these should not impose any challenges to existing targets.One edit was made to the
-unknown-uefi.mdsupported targets Markdown file to mention the existence of a tier 3 target. Since this target will originate as a tier 3 target, it will not be included inrustupfor installation. I am willing to make more changes to the Markdown document in order to document how to build, install, and use this new target. Thank you for your consideration of this pull request!!